// 定义一个接口
interface person{
    name:string,
    age:number,
    say:()=>string,
    demo:string | string[] | (()=>string) //联合类型
}

function pp(ip:person){
    console.log("姓名:"+ip.name+"年龄:"+ip.age);
    console.log(ip.say());
    console.log(ip.demo)
}

// 调用函数
pp({
    name:"张三",
    age:16,
    say:()=>{
        return "ok";
    },
    demo:"今天的天气很好"
})